package com.mju.feign.clients;

import com.mju.controller.common.JsonResult;
import com.mju.pojo.RefundInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("refund-service")
public interface RefundInfoClient {
    //记录退款信息
    @GetMapping("/refundInfo/createrRefund/{oid}/{reason}")
    public JsonResult<RefundInfo> createrRefundByOrder(@PathVariable Integer oid, @PathVariable String reason);

    //更新退款信息(补全信息)
    @PostMapping("/refundInfo/updateRefund")
    public JsonResult updateRefund(
            @RequestParam("refundNo") String refundNo, @RequestParam("tradeNo")String tradeNo,
            @RequestParam("content")String content, @RequestParam("refundStatus") String refundStatus);
}
